package com.devilvan.betrice.sinofinance.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.devilvan.betrice.common.BasePo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serial;
import java.io.Serializable;

/**
* @author Evad.Wu
* @Description 新浪财经-A股实时行情信息表 映射
* @date 2023-03-22
*/
@Setter
@Getter
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "SINA_ASHARES_QUOTES")

@Entity
@Table(name = "SINA_ASHARES_QUOTES")
@DynamicInsert
@EntityListeners(AuditingEntityListener.class)
@Schema(description = "新浪财经-A股实时行情信息表 映射")
public class SinaAsharesQuotesPo extends BasePo implements Serializable {
    @Serial
    private static final long serialVersionUID = -5010473467356692973L;
    @Schema(description = "板块代码")
    @TableField(value = "SYMBOL")
    @Column(name = "SYMBOL", columnDefinition = "VARCHAR(32) NOT NULL COMMENT '板块代码'")
    private String symbol;
    @Schema(description = "名称(name)")
    @TableField(value = "CNAME")
    @Column(name = "CNAME", columnDefinition = "VARCHAR(128) NOT NULL COMMENT '名称(name)'")
    private String cname;
    @Schema(description = "代码")
    @TableField(value = "CODE")
    @Column(name = "CODE", columnDefinition = "VARCHAR(32) NOT NULL COMMENT '代码'")
    private String code;
    @Schema(description = "最新价(trade)")
    @TableField(value = "LATEST_PRICE")
    @Column(name = "LATEST_PRICE", columnDefinition = "DOUBLE(18) COMMENT '最新价(trade)'")
    private Double latestPrice;
    @Schema(description = "涨跌额(pricechange)")
    @TableField(value = "DIFF")
    @Column(name = "DIFF", columnDefinition = "DOUBLE(18) COMMENT '涨跌额(pricechange)'")
    private Double diff;
    @Schema(description = "涨跌幅(changepercent)")
    @TableField(value = "CHG")
    @Column(name = "CHG", columnDefinition = "DOUBLE(18) COMMENT '涨跌幅(changepercent)'")
    private Double chg;
    @Schema(description = "买入")
    @TableField(value = "BUY")
    @Column(name = "BUY", columnDefinition = "DOUBLE(18) COMMENT '买入'")
    private Double buy;
    @Schema(description = "卖出")
    @TableField(value = "SELL")
    @Column(name = "SELL", columnDefinition = "DOUBLE(18) COMMENT '卖出'")
    private Double sell;
    @Schema(description = "昨收(settlement)")
    @TableField(value = "PRECLOSE")
    @Column(name = "PRECLOSE", columnDefinition = "DOUBLE(18) COMMENT '昨收(settlement)'")
    private Double preclose;
    @Schema(description = "今开")
    @TableField(value = "OPEN")
    @Column(name = "OPEN", columnDefinition = "DOUBLE(18) COMMENT '今开'")
    private Double open;
    @Schema(description = "最高(high)")
    @TableField(value = "HIGH_PRICE")
    @Column(name = "HIGH_PRICE", columnDefinition = "DOUBLE(18) COMMENT '最高(high)'")
    private Double highPrice;
    @Schema(description = "最低(low)")
    @TableField(value = "LOW_PRICE")
    @Column(name = "LOW_PRICE", columnDefinition = "DOUBLE(18) COMMENT '最低(low)'")
    private Double lowPrice;
    @Schema(description = "成交量/手")
    @TableField(value = "VOLUME")
    @Column(name = "VOLUME", columnDefinition = "DOUBLE(18) COMMENT '成交量/手'")
    private Double volume;
    @Schema(description = "成交额/元")
    @TableField(value = "AMOUNT")
    @Column(name = "AMOUNT", columnDefinition = "DOUBLE(18) COMMENT '成交额/元'")
    private Double amount;
    @Schema(description = "市值")
    @TableField(value = "MKTCAP")
    @Column(name = "MKTCAP", columnDefinition = "DOUBLE(18) COMMENT '市值'")
    private Double mktcap;
    @Schema(description = "市盈率(per)")
    @TableField(value = "PE")
    @Column(name = "PE", columnDefinition = "DOUBLE(12) COMMENT '市盈率(per)'")
    private Double pe;
    @Schema(description = "市净率")
    @TableField(value = "PB")
    @Column(name = "PB", columnDefinition = "DOUBLE(12) COMMENT '市净率'")
    private Double pb;
    @Schema(description = "周转率")
    @TableField(value = "TURNOVERRATIO")
    @Column(name = "TURNOVERRATIO", columnDefinition = "DOUBLE(12) COMMENT '周转率'")
    private Double turnoverratio;
}
